<template>
  <el-dialog :visible.sync="dialogVisible" width="60%">
    <div class="content">
      <div class="text" v-html="content"></div></div
  ></el-dialog>
</template>

<script>
export default {
  name: "loginView",
  data() {
    return {
      dialogVisible: false,
      info: {},
	  content:'',
    };
  },
  methods: {
      open(type) {
        this.dialogVisible = true;
        this.getList(type);
      },
      getList(type) {
        this.$post("/index/agreement").then((res) => {
          this.info = res.data;
          switch(type)
          {
            case 'user_agreement':
              this.content = this.info.user_agreement;
              break;
              case 'user_agreement':
              this.content = this.info.user_agreement;
              break;
              case 'service_agreement':
              this.content = this.info.service_agreement;
              break;
              case 'service_upload_agreement':
              this.content = this.info.service_upload_agreement;
              break;
              case 'service_download_agreement':
              this.content = this.info.service_download_agreement;
              break;
              case 'service_inclusion_agreement':
              this.content = this.info.service_inclusion_agreement;
              break;
              case 'disclaimer':
              this.content = this.info.disclaimer;
              break;
          }
        
        });
      },
  },
};
</script>

<style scoped lang="scss">
::v-deep .el-dialog__body {
  padding: 0;
}
::v-deep .el-dialog__header {
  padding: 0;
}
.content {
  background: #fff;
  padding: 30px;
}
@media screen and (max-width: 768px) {
  :deep .el-dialog {
    width: 90% !important;
  }
}
</style>
